<template>
  <div id="print-iframe-ll" >
      <div  v-for="(item,index) in list" :key="index" style="height:100%">
        <table border="1" style="border-collapse:collapse;width:100mm;height:90mm;margin:0 auto">
            <tr style="height: 60px;text-align:center">
              <td colspan="4"><h2 style="line-height:50px">装箱单</h2></td>
            </tr>
            <tr>
              <th>产品名称</th>
              <td colspan="3">
              {{ item.productName }}
              </td>
            </tr>
            <tr>
              <th>协议书号</th>
              <td>{{ item.xieYiShuHao }}</td>
              <th>产品编号</th>
              <td>{{ item.productNo }}</td>
            </tr>
            <tr>
              <th>客户单号</th>
              <td>{{ item.customerBillNo }}</td>
              <th>本箱数量</th>
              <td>{{ item.nowBoxsQuantity }}枚</td>
            </tr>
            <tr>
              <th>包装规格</th>
              <td colspan="3">
                {{ item.cartonDimension }}
              </td>
            </tr>
            <tr>
              <th>箱数</th>
              <td colspan="3">第{{ item.nowBoxNo }}箱，共{{ item.sumBoxCount }}箱</td>
            </tr>
            <tr>
              <th>生产日期</th>
              <td colspan="3">{{ item.productionDate }}</td>
            </tr>
            <tr>
              <th>备注</th>
              <td colspan="3">{{ item.remark }}</td>
            </tr>
          <tbody></tbody>
        </table>
      </div>
  </div>
</template>

<script>
export default {
  name: "PrintOrder",
  props: {
    list: {
      type: Array,
      default: [],
    },
  },
  data() {
    return {
      showT: true,
    };
  },
  watch: {
    list: {
      deep: true,
      immediate: true,
      handler(val) {},
    },
  },
  created() {},
  methods: {
    getDate() {
      let date = new Date();
      //年
      let year = date.getFullYear();
      //月份是从0月开始获取的，所以要+1;
      let month = date.getMonth() + 1;
      //日
      let day = date.getDate();
      return year + "-" + month + "-" + day;
    },
  },
};
</script>

<style lang="scss" scoped>

body {
  margin: 0;
  padding: 0;
}
table,
td,
th {
  border: 1px solid #000;
}
table {
  width: 100%;
  td,
  th {
    padding: 0 4px;
    white-space: nowrap;
    line-height: 40px;
    height: 40px;
  }
}
</style>
